function varargout = getImg(obj,command,x,y,slice,rep,maskType)
% return image data with any request

if ~ischar(command)
    error('The command should be a string');
end

% para = varargin;

switch lower(command)
    case 'divti'
        varargout{1} = getDivTi(obj,x,y,slice,rep,maskType);
end


    
end

function out_data = getDivTi(obj,x,y,slice,rep,maskType)
    nTi = length(obj.dDivasl);
    out_data = zeros(nTi,1);
    if isempty(maskType)
        maskType = 'gray';
    end
    for i = 1:nTi
        Img = obj.dDivasl(i).getMaskedImg('mean',maskType,slice,rep);
        out_data(i) = Img(x,y);%obj.dDivasl(i).getMean('mri',x,y,slice,rep);
    end

end